/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ctu.labiras.aco;

import java.io.File;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;

/**
 *
 * @author thiago
 */
public class Parametros {
    private float alpha;
    private float beta;
    private double rho;
    private double q;
    private boolean usarHeuristica;
    private int numAnts;       
    private int numCiclos;
    private int numIter;
    private double c;
    private int numCelulas;
    private int numTransicoes;
    
    public Parametros() {}
        
    /*public void configuraParametros() {
        try{
            DocumentBuilderFactory xml = DocumentBuilderFactory.newInstance();
            Document doc = xml.newDocumentBuilder().parse(new File("src/utils/config.xml"));                        
            
            setAlpha(Float.parseFloat(doc.getElementsByTagName("alpha").item(0).getTextContent()));
            setBeta(Float.parseFloat(doc.getElementsByTagName("beta").item(0).getTextContent()));
            setRho(Double.parseDouble(doc.getElementsByTagName("rho").item(0).getTextContent()));
            setQ(Double.parseDouble(doc.getElementsByTagName("q").item(0).getTextContent()));
            setUsarHeuristica(Boolean.parseBoolean(doc.getElementsByTagName("heuristica").item(0).getTextContent()));
            setNumAnts(Integer.parseInt(doc.getElementsByTagName("ants").item(0).getTextContent()));            
            setNumIter(Integer.parseInt(doc.getElementsByTagName("iteracoes").item(0).getTextContent()));            
            setC(Double.parseDouble(doc.getElementsByTagName("c").item(0).getTextContent()));
            
            setNumCelulas(Integer.parseInt(doc.getElementsByTagName("num_celulas").item(0).getTextContent()));            
            setNumTransicoes(Integer.parseInt(doc.getElementsByTagName("num_transicoes").item(0).getTextContent()));            
        } catch(Exception e) {
            e.printStackTrace();
        }
    }*/

    /**
     * @return the numAnts
     */
    public int getNumAnts() {
        return numAnts;
    }

    /**
     * @return the numCelulas
     */
    public int getNumCelulas() {
        return numCelulas;
    }

    /**
     * @return the numTransicoes
     */
    public int getNumTransicoes() {
        return numTransicoes;
    }

    /**
     * @return the c
     */
    public double getC() {
        return c;
    }

    /**
     * @return the numIter
     */
    public int getNumIter() {
        return numIter;
    }

    /**
     * @return the alpha
     */
    public float getAlpha() {
        return alpha;
    }

    /**
     * @return the beta
     */
    public float getBeta() {
        return beta;
    }

    /**
     * @return the rho
     */
    public double getRho() {
        return rho;
    }

    /**
     * @return the q
     */
    public double getQ() {
        return q;
    }

    /**
     * @param alpha the alpha to set
     */
    public void setAlpha(float alpha) {
        this.alpha = alpha;
    }

    /**
     * @param beta the beta to set
     */
    public void setBeta(float beta) {
        this.beta = beta;
    }

    /**
     * @param rho the rho to set
     */
    public void setRho(double rho) {
        this.rho = rho;
    }

    /**
     * @param q the q to set
     */
    public void setQ(double q) {
        this.q = q;
    }

    /**
     * @return the usarHeuristica
     */
    public boolean isUsarHeuristica() {
        return usarHeuristica;
    }

    /**
     * @param usarHeuristica the usarHeuristica to set
     */
    public void setUsarHeuristica(boolean usarHeuristica) {
        this.usarHeuristica = usarHeuristica;
    }

    /**
     * @param numAnts the numAnts to set
     */
    public void setNumAnts(int numAnts) {
        this.numAnts = numAnts;
    }

    /**
     * @return the numCiclos
     */
    public int getNumCiclos() {
        return numCiclos;
    }

    /**
     * @param numCiclos the numCiclos to set
     */
    public void setNumCiclos(int numCiclos) {
        this.numCiclos = numCiclos;
    }

    /**
     * @param numIter the numIter to set
     */
    public void setNumIter(int numIter) {
        this.numIter = numIter;
    }

    /**
     * @param c the c to set
     */
    public void setC(double c) {
        this.c = c;
    }

    /**
     * @param numCelulas the numCelulas to set
     */
    public void setNumCelulas(int numCelulas) {
        this.numCelulas = numCelulas;
    }

    /**
     * @param numTransicoes the numTransicoes to set
     */
    public void setNumTransicoes(int numTransicoes) {
        this.numTransicoes = numTransicoes;
    }
}